delete() operator
wThe delete operator frees up the memory allocated through new. To do so, the syntax is as in the example.

delete ptr;

After deleting a pointer, it can be a good idea to reset it to point to NULL.
w
wNULL is a standard compiler-defined statement that sets the pointer to point to, literally, nothing. By doing this, you minimise the potential for doing something foolish with the pointer.

The pointer can be initialised using free memory. This allows dynamic allocation of array memory. It is most useful for setting up structures called linked lists.
The final implication of NULL is that if there is no more free memory, it is possible for the ptr after being "new"-ed to point to NULL. Therefore, it is good programming practice to check to ensure that the pointer points to something before using it. Obviously, the program is unlikely to work without this check.